################
# Project info #
################
set(CMAKE_C_COMPILER clang)
set(CMAKE_CXX_COMPILER clang++)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_TYPE Debug)

cmake_minimum_required(VERSION 3.0)
project(DarkMagic)

set(AUTHOR "William Behrens")
set(VERSION "beta")
set(DESCRIPTION "A basic game engine made with NCurses")

###########
# Options #
###########
option(BUILD_DEMO "Builds demo program" ON)
option(BUILD_TESTS "Builds test programs" OFF)
option(QUIET "Silences extra build info" OFF)

##############
# Print info #
##############
if(NOT QUIET)
    message("**************************************************")
    message("Build for: ${CMAKE_PROJECT_NAME}")
    message("Author: ${AUTHOR}")
    message("Version: ${VERSION}")
    message("Description: ${DESCRIPTION}")
    message("Build Type: ${CMAKE_BUILD_TYPE}")
    message("Configuration: BUILD_DEMO = ${BUILD_DEMO}, BUILD_TESTS = ${BUILD_TESTS}")
    message("**************************************************")
endif(NOT QUIET)

#############
# Variables #
#############

#########################
# Dependancies/Packages #
#########################

#########################
# Build primary library #
#########################
include(${CMAKE_CURRENT_LIST_DIR}/src/mylog/CMakeLists.txt)
include(${CMAKE_CURRENT_LIST_DIR}/src/darkmagic/CMakeLists.txt)


######################
# Build demo program #
######################
if(BUILD_DEMO)
    file(GLOB DEMO_SRC ${CMAKE_CURRENT_LIST_DIR}/src/demo/Main.cpp)
    add_executable(demoApp ${DEMO_SRC})
    target_include_directories(demoApp PRIVATE ${LOGGER_INCLUDE_DIR} ${DARKMAGIC_INCLUDE_DIR})
    target_link_libraries(demoApp mylog darkmagic)
endif(BUILD_DEMO)

###############
# Build tests #
###############
if(BUILD_TESTS)
endif(BUILD_TESTS)

###############
# Extra tasks #
###############
